import { HomeComponent } from './home/home.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PageComponent } from '@app/view/page/page.component';

const routes: Routes = [
	{
		path: '',
		component: PageComponent,
		children: [
			{
				path: 'home',
				component: HomeComponent,
			},
			{
				path: 'visit',
				loadChildren: () => import('../visit/visit.module').then((mod) => mod.VisitModule),
			},
			{
				path: 'disclose',
				loadChildren: () => import('../disclose/disclose.module').then((mod) => mod.DiscloseModule),
			},
			{
				path: 'base',
				loadChildren: () => import('../base/base.module').then((mod) => mod.BaseModule),
			},
			{
				path: 'system',
				loadChildren: () => import('../system/system.module').then((mod) => mod.SystemModule),
			},
			{
				path: 'grid',
				loadChildren: () => import('../grid/grid.module').then((mod) => mod.GridModule),
			}
		]
	}
];

@NgModule({
	imports: [RouterModule.forChild(routes)],
	exports: [RouterModule]
})
export class PageRoutingModule { }
